
package stcu.robjects;

import com.nvlled.route.*;

public class Login extends RoutedObject {

    private String username;

    // TODO: change username to idNumber
    public Login(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public static class Status extends RoutedObject {
        private String code;
        private String idNumber;

        public Status(String code, String idNumber) {
            this.code = code;
            this.idNumber = idNumber;
        }

        public boolean failed() {
            return !isOK();
        }

        public String getCode() {
            return code;
        }

        public String getIdNumber() {
            return idNumber;
        }

        public boolean isOK() {
            return code.equals("ok");
        }
    }
}
